<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>助管信息录入系统</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <link href="css/style.css" rel="stylesheet">
    <style type="text/css">
    .hide{
        display: none;
    }
    </style>
</head>

<body onLoad="checkCookie()">
    <nav class="navbar navbar-default navbar-static-top nav-header" role="navigation">
        <div class="container">
            <div class="nav-img">
                <a class="" href="http://www.uestc.edu.cn/">
                    <img alt="Brand" src="img/logo.png">
                </a>
            </div>
            <div class="navbar-left ml-20">
                <a href="./index.html">助管信息录入系统</a>
            </div>
            <div class="navbar-right mt-10">
                <span>欢迎您：</span>
                <span id="user"></span>
                <a href="./login.html" class="btn btn-default">登出</a>
            </div>
        </div>
    </nav>
    <div id="layout-container" class="container-fluid content">
        <div class="row mt-10">
            <div class="col-md-2 nav-row">
                <div class="span6">
                    <ul class="nav nav-list">
                        <li class="nav-header" v-bind:class="{ 'hide': admin}">管理员功能</li>

                        <li v-bind:class="{ 'active': li.Shenhe,'hide':admin}"><a v-on:click="ijump('./subform-shenhe.html','Shenhe')"> 补助信息审核</a></li>

                        <li v-bind:class="{ 'active': li.Zhuguan,'hide':admin}"><a v-on:click="ijump('./subform-zhuguan.html','Zhuguan')"> 助管信息管理</a></li>

                        <li v-bind:class="{ 'active': li.User,'hide':admin}"><a v-on:click="ijump('./subform-User.html','User')"> 用户信息管理</a></li>

                        <li><a v-bind:class="{ 'active': li.Dept,'hide':admin}" v-on:click="ijump('./subform-dept.html','Dept')">部门信息管理</a></li>

                        <li><a v-bind:class="{ 'active': li.Month,'hide':admin}" v-on:click="ijump('./subform-month.html','Month')">日期与金额管理</a></li>

                        <li v-bind:class="{ 'hide': dept}" class="nav-header">部门用户</li>
                        <li v-bind:class="{ 'active': li.Buzhu,'hide':dept}"><a v-on:click="ijump('./subform-buzhu.html','Buzhu')"> 补助信息管理</a></li>
                        <li><a v-bind:class="{ 'active': li.Bufa,'hide':dept}" v-on:click="ijump('./subform-bufa.html','Bufa')"> 申请补助补发</a></li>
                        <li><a v-bind:class="{ 'active': li.Editpwd,'hide':dept}" v-on:click="ijump('./subform-editpwd.html','Editpwd')"> 修改密码</a></li>
                        <li class="nav-header" v-bind:class="{ 'hide': stu}">学生</li>
                        <li v-bind:class="{ 'hide': stu}"><a href=""> 查看补助</a></li>
                        <li class="divider">
                            <hr>
                        </li>
                        <li><a href="">更多帮助</a></li>
                    </ul>
                </div>
            </div>
            <div class="col-md-10">
                <iframe id="myiframe" v-bind:src="url" src="" frameborder="0" scrolling="no"></iframe>
            </div>
        </div>
    </div>
    <footer class="navbar navbar-default navbar-footer mt-20">
        <div style="clear:both"></div>
        <div class="container">
            <div class="row">
                <div class="col-xs-8" style="margin-top:10px;">
                    <div>
                        <p>
                            清水河校区: 成都市高新区（西区）西源大道2006号 &nbsp; 邮编:&nbsp;611731 &nbsp;&nbsp;</p>
                        <p>
                            沙河校区: 成都市建设北路二段四号 &nbsp; 邮编:&nbsp;610054</p>
                        <p>
                            蜀ICP备&nbsp;05006379&nbsp;号&nbsp;&nbsp;&nbsp;I　川公网安备&nbsp;51019002000280&nbsp;号&nbsp;</p>
                    </div>
                </div>
            </div>
        </div>
    </footer>
</body>
<script type="text/javascript" src="js/dist/jquery-2.2.4.js"></script>
<script type="text/javascript" src="js/dist/bootstrap.min.js"></script>
<script type="text/javascript" src="js/dist/jquery.cookie.js"></script>
<script type="text/javascript">
var ifm= document.getElementById("myiframe");
ifm.height=document.documentElement.clientHeight;

function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=")
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1
            c_end = document.cookie.indexOf(";", c_start)
            if (c_end == -1) c_end = document.cookie.length
            return unescape(document.cookie.substring(c_start, c_end))
        }
    }
    return ""
};


function checkCookie() {
    username = getCookie('userName')
    role = getCookie('role')
    console.log(document.cookie);
    console.log(username);
    console.log(role);
    if (username != null && username != "") {
        alert('Welcome:' + username + '!')
        $('#user')[0].innerHTML = username;
    } else {
        alert("您还未登录！请登录")
        window.location.replace("./login.html");
    }
}
</script>
</script>
<script type="text/javascript" src="js/dist/vue.js"></script>
<script type="text/javascript" src="js/layout.js"></script>

</html>
